namespace VAdvantage.Model
{

    /** Generated Model - DO NOT CHANGE */
    using System;
    using System.Text;
    using VAdvantage.DataBase;
    using VAdvantage.Common;
    using VAdvantage.Classes;
    using VAdvantage.Process;
    using VAdvantage.Model;
    using VAdvantage.Utility;
    using System.Data;
    /** Generated Model for RC_TabPanels
     *  @author Jagmohan Bhatt (generated) 
     *  @version Vienna Framework 1.1.1 - $Id$ */
    public class X_RC_TabPanels : PO
    {
        public X_RC_TabPanels(Context ctx, int RC_TabPanels_ID, String trxName)
            : base(ctx, RC_TabPanels_ID, trxName)
        {
            /** if (RC_TabPanels_ID == 0)
            {
            SetRC_RoleCenterTab_ID (0);
            SetRC_TabPanels_ID (0);
            }
             */
        }
        public X_RC_TabPanels(Ctx ctx, int RC_TabPanels_ID, String trxName)
            : base(ctx, RC_TabPanels_ID, trxName)
        {
            /** if (RC_TabPanels_ID == 0)
            {
            SetRC_RoleCenterTab_ID (0);
            SetRC_TabPanels_ID (0);
            }
             */
        }
        /** Load Constructor 
        @param ctx context
        @param rs result set 
        @param trxName transaction
        */
        public X_RC_TabPanels(Context ctx, DataRow rs, String trxName)
            : base(ctx, rs, trxName)
        {
        }
        /** Load Constructor 
        @param ctx context
        @param rs result set 
        @param trxName transaction
        */
        public X_RC_TabPanels(Ctx ctx, DataRow rs, String trxName)
            : base(ctx, rs, trxName)
        {
        }
        /** Load Constructor 
        @param ctx context
        @param rs result set 
        @param trxName transaction
        */
        public X_RC_TabPanels(Ctx ctx, IDataReader dr, String trxName)
            : base(ctx, dr, trxName)
        {
        }
        /** Static Constructor 
         Set Table ID By Table Name
         added by ->Harwinder */
        static X_RC_TabPanels()
        {
            Table_ID = Get_Table_ID(Table_Name);
            model = new KeyNamePair(Table_ID, Table_Name);
        }
        /** Serial Version No */
        static long serialVersionUID = 27593889237780L;
        /** Last Updated Timestamp 7/27/2011 4:22:01 PM */
        public static long updatedMS = 1311763920991L;
        /** AD_Table_ID=1000194 */
        public static int Table_ID;
        // =1000194;

        /** TableName=RC_TabPanels */
        public static String Table_Name = "RC_TabPanels";

        protected static KeyNamePair model;
        protected Decimal accessLevel = new Decimal(7);
        /** AccessLevel
        @return 7 - System - Client - Org 
        */
        protected override int Get_AccessLevel()
        {
            return Convert.ToInt32(accessLevel.ToString());
        }
        /** Load Meta Data
        @param ctx context
        @return PO Info
        */
        protected override POInfo InitPO(Context ctx)
        {
            POInfo poi = POInfo.GetPOInfo(ctx, Table_ID);
            return poi;
        }
        /** Load Meta Data
        @param ctx context
        @return PO Info
        */
        protected override POInfo InitPO(Ctx ctx)
        {
            POInfo poi = POInfo.GetPOInfo(ctx, Table_ID);
            return poi;
        }
        /** Info
        @return info
        */
        public override String ToString()
        {
            StringBuilder sb = new StringBuilder("X_RC_TabPanels[").Append(Get_ID()).Append("]");
            return sb.ToString();
        }
        /** Set User Query.
        @param AD_UserQuery_ID Saved User Query */
        public void SetAD_UserQuery_ID(int AD_UserQuery_ID)
        {
            if (AD_UserQuery_ID <= 0) Set_Value("AD_UserQuery_ID", null);
            else
                Set_Value("AD_UserQuery_ID", AD_UserQuery_ID);
        }
        /** Get User Query.
        @return Saved User Query */
        public int GetAD_UserQuery_ID()
        {
            Object ii = Get_Value("AD_UserQuery_ID");
            if (ii == null) return 0;
            return Convert.ToInt32(ii);
        }
        /** Set Colspan.
        @param Colspan Colspan */
        public void SetColspan(int Colspan)
        {
            Set_Value("Colspan", Colspan);
        }
        /** Get Colspan.
        @return Colspan */
        public int GetColspan()
        {
            Object ii = Get_Value("Colspan");
            if (ii == null) return 0;
            return Convert.ToInt32(ii);
        }
        /** Set RC_RoleCenterTab_ID.
        @param RC_RoleCenterTab_ID RC_RoleCenterTab_ID */
        public void SetRC_RoleCenterTab_ID(int RC_RoleCenterTab_ID)
        {
            if (RC_RoleCenterTab_ID < 1) throw new ArgumentException("RC_RoleCenterTab_ID is mandatory.");
            Set_ValueNoCheck("RC_RoleCenterTab_ID", RC_RoleCenterTab_ID);
        }
        /** Get RC_RoleCenterTab_ID.
        @return RC_RoleCenterTab_ID */
        public int GetRC_RoleCenterTab_ID()
        {
            Object ii = Get_Value("RC_RoleCenterTab_ID");
            if (ii == null) return 0;
            return Convert.ToInt32(ii);
        }
        /** Set RC_TabPanels_ID.
        @param RC_TabPanels_ID RC_TabPanels_ID */
        public void SetRC_TabPanels_ID(int RC_TabPanels_ID)
        {
            if (RC_TabPanels_ID < 1) throw new ArgumentException("RC_TabPanels_ID is mandatory.");
            Set_ValueNoCheck("RC_TabPanels_ID", RC_TabPanels_ID);
        }
        /** Get RC_TabPanels_ID.
        @return RC_TabPanels_ID */
        public int GetRC_TabPanels_ID()
        {
            Object ii = Get_Value("RC_TabPanels_ID");
            if (ii == null) return 0;
            return Convert.ToInt32(ii);
        }
        /** Set Record ID.
        @param Record_ID Direct internal record ID */
        public void SetRecord_ID(int Record_ID)
        {
            if (Record_ID <= 0) Set_Value("Record_ID", null);
            else
                Set_Value("Record_ID", Record_ID);
        }
        /** Get Record ID.
        @return Direct internal record ID */
        public int GetRecord_ID()
        {
            Object ii = Get_Value("Record_ID");
            if (ii == null) return 0;
            return Convert.ToInt32(ii);
        }

        /** RoleCenterPanels AD_Reference_ID=1000081 */
        public static int ROLECENTERPANELS_AD_Reference_ID = 1000081;
        /** View = 1 */
        public static String ROLECENTERPANELS_View = "1";
        /** Chart = 2 */
        public static String ROLECENTERPANELS_Chart = "2";
        /** KPI = 3 */
        public static String ROLECENTERPANELS_KPI = "3";
        /** Is test a valid value.
        @param test testvalue
        @returns true if valid **/
        public bool IsRoleCenterPanelsValid(String test)
        {
            return test == null || test.Equals("1") || test.Equals("2") || test.Equals("3");
        }
        /** Set Role Center Panels.
        @param RoleCenterPanels Role Center Panels */
        public void SetRoleCenterPanels(String RoleCenterPanels)
        {
            if (!IsRoleCenterPanelsValid(RoleCenterPanels))
                throw new ArgumentException("RoleCenterPanels Invalid value - " + RoleCenterPanels + " - Reference_ID=1000081 - 1 - 2 - 3");
            if (RoleCenterPanels != null && RoleCenterPanels.Length > 1)
            {
                log.Warning("Length > 1 - truncated");
                RoleCenterPanels = RoleCenterPanels.Substring(0, 1);
            }
            Set_Value("RoleCenterPanels", RoleCenterPanels);
        }
        /** Get Role Center Panels.
        @return Role Center Panels */
        public String GetRoleCenterPanels()
        {
            return (String)Get_Value("RoleCenterPanels");
        }
        /** Set Rowspan.
        @param Rowspan Rowspan */
        public void SetRowspan(int Rowspan)
        {
            Set_Value("Rowspan", Rowspan);
        }
        /** Get Rowspan.
        @return Rowspan */
        public int GetRowspan()
        {
            Object ii = Get_Value("Rowspan");
            if (ii == null) return 0;
            return Convert.ToInt32(ii);
        }
        /** Set Sequence.
        @param SeqNo Method of ordering elements;
         lowest number comes first */
        public void SetSeqNo(int SeqNo)
        {
            Set_Value("SeqNo", SeqNo);
        }
        /** Get Sequence.
        @return Method of ordering elements;
         lowest number comes first */
        public int GetSeqNo()
        {
            Object ii = Get_Value("SeqNo");
            if (ii == null) return 0;
            return Convert.ToInt32(ii);
        }
    }

}
